from datetime import datetime
from datetime import date

now = datetime.now()
print(now)

dt = datetime(2017, 9, 8, 16, 6)
print(dt)
print(dt.timestamp())
t = 1314520
print(datetime.fromtimestamp(t))
# timestamp是一个浮点数，它没有时区的概念，而datetime是有时区的

# cday = datetime.strptime('2017-05-05', '%Y-%m-%d')
today = date.today()
print(today)
